﻿namespace HauWei.RepUtils
{
    using DevExpress.XtraPrinting;
    using DevExpress.XtraReports.UI;
    using System;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing.Printing;

    public class RepBase : XtraReport
    {
        private BottomMarginBand bottomMarginBand;
        private DataSet dataSet = new DataSet();
        private DetailBand detailBand;
        private IContainer icontainer = null;
        private TopMarginBand topMarginBand;

        public RepBase()
        {
            this.InitializeComponent();
        }

        protected override void Dispose(bool disposing)
        {
            if (disposing && (this.icontainer != null))
            {
                this.icontainer.Dispose();
            }
            base.Dispose(disposing);
        }

        private void InitializeComponent()
        {
            this.dataSet = new DataSet();
            this.detailBand = new DetailBand();
            this.topMarginBand = new TopMarginBand();
            this.bottomMarginBand = new BottomMarginBand();
            this.dataSet.BeginInit();
            this.BeginInit();
            this.detailBand.Name = "Detail";
            this.topMarginBand.Name = "TopMargin";
            this.topMarginBand.Padding = new PaddingInfo(0, 0, 0, 0, 100f);
            this.topMarginBand.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft;
            this.bottomMarginBand.Name = "BottomMargin";
            this.bottomMarginBand.Padding = new PaddingInfo(0, 0, 0, 0, 100f);
            this.bottomMarginBand.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft;
            this.dataSet.DataSetName = "dsRep";
            this.dataSet.SchemaSerializationMode = SchemaSerializationMode.IncludeSchema;
            base.Bands.AddRange(new Band[] { this.detailBand, this.topMarginBand, this.bottomMarginBand });
            base.DataMember = "DataTable1";
            base.DataSource = this.dataSet;
            base.Version = "10.1";
            this.BeforePrint += new PrintEventHandler(this.RepBase_BeforePrnum);
            this.dataSet.EndInit();
            this.EndInit();
        }

        private void RepBase_BeforePrnum(object sender, PrintEventArgs e)
        {
        }
    }
}

